Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test that opaque types can't have themselves as a hidden type with incompatible lifetimes #123782

Merged
merged 1 commit into from
Jun 19, 2024

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Apr 11, 2024

fixes #122876

This PR used to add extra logic to prevent those cases, but after #113169 this is implicitly rejected, because such usages are not defining.

@rustbot
Copy link
Collaborator

rustbot commented Apr 11, 2024

r? @TaKO8Ki

rustbot has assigned @TaKO8Ki.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 11, 2024
@oli-obk
Copy link
Contributor Author

oli-obk commented Apr 16, 2024

r? @aliemjay

@rustbot rustbot assigned aliemjay and unassigned TaKO8Ki Apr 16, 2024
@bors
Copy link
Contributor

bors commented May 13, 2024

☔ The latest upstream changes (presumably #124914) made this pull request unmergeable. Please resolve the merge conflicts.

@oli-obk oli-obk changed the title Ensure opaque types can't have themselves as a hidden type with incompatible lifetimes Test that opaque types can't have themselves as a hidden type with incompatible lifetimes Jun 18, 2024
@oli-obk
Copy link
Contributor Author

oli-obk commented Jun 18, 2024

r? types

@rustbot rustbot added the T-types Relevant to the types team, which will review and decide on the PR/issue. label Jun 18, 2024
@rustbot rustbot assigned compiler-errors and unassigned aliemjay Jun 18, 2024
//! Test that we don't allow coercing an opaque type with a static
//! lifetime to a free version of itself. While this kind of
//! conversion is fine for rigid types, the hidden type behind an opaque
//! type may
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this comment is incomplete? 🤔

@compiler-errors
Copy link
Member

pls fix test comment then r=me

@compiler-errors
Copy link
Member

@rustbot author

(so it is out of my review queue hehe)

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 18, 2024
@oli-obk
Copy link
Contributor Author

oli-obk commented Jun 18, 2024

@bors r=compiler-errors rollup

@bors
Copy link
Contributor

bors commented Jun 18, 2024

📌 Commit de473a5 has been approved by compiler-errors

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 18, 2024
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Jun 18, 2024
…r-errors

Test that opaque types can't have themselves as a hidden type with incompatible lifetimes

fixes rust-lang#122876

This PR used to add extra logic to prevent those cases, but after rust-lang#113169 this is implicitly rejected, because such usages are not defining.
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Jun 18, 2024
…r-errors

Test that opaque types can't have themselves as a hidden type with incompatible lifetimes

fixes rust-lang#122876

This PR used to add extra logic to prevent those cases, but after rust-lang#113169 this is implicitly rejected, because such usages are not defining.
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 18, 2024
…llaumeGomez

Rollup of 9 pull requests

Successful merges:

 - rust-lang#123782 (Test that opaque types can't have themselves as a hidden type with incompatible lifetimes)
 - rust-lang#124580 (Suggest removing unused tuple fields if they are the last fields)
 - rust-lang#125852 (improve tip for inaccessible traits)
 - rust-lang#126422 (Suggest using a standalone doctest for non-local impl defs)
 - rust-lang#126427 (Rewrite `intrinsic-unreachable`, `sepcomp-cci-copies`, `sepcomp-inlining` and `sepcomp-separate` `run-make` tests to rmake.rs)
 - rust-lang#126493 (safe transmute: support non-ZST, variantful, uninhabited enums)
 - rust-lang#126572 (override user defined channel when using precompiled rustc)
 - rust-lang#126615 (Add `rustc-ice*` to `.gitignore`)
 - rust-lang#126632 (Replace `move||` with `move ||`)

Failed merges:

 - rust-lang#126558 (hir_typeck: be more conservative in making "note caller chooses ty param" note)

r? `@ghost`
`@rustbot` modify labels: rollup
jieyouxu added a commit to jieyouxu/rust that referenced this pull request Jun 19, 2024
…r-errors

Test that opaque types can't have themselves as a hidden type with incompatible lifetimes

fixes rust-lang#122876

This PR used to add extra logic to prevent those cases, but after rust-lang#113169 this is implicitly rejected, because such usages are not defining.
fmease added a commit to fmease/rust that referenced this pull request Jun 19, 2024
…r-errors

Test that opaque types can't have themselves as a hidden type with incompatible lifetimes

fixes rust-lang#122876

This PR used to add extra logic to prevent those cases, but after rust-lang#113169 this is implicitly rejected, because such usages are not defining.
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 19, 2024
Rollup of 7 pull requests

Successful merges:

 - rust-lang#123782 (Test that opaque types can't have themselves as a hidden type with incompatible lifetimes)
 - rust-lang#124580 (Suggest removing unused tuple fields if they are the last fields)
 - rust-lang#125787 (Migrate `bin-emit-no-symbols` `run-make` test to `rmake`)
 - rust-lang#126553 (match lowering: expand or-candidates mixed with candidates above)
 - rust-lang#126594 (Make async drop code more consistent with regular drop code)
 - rust-lang#126654 (Make pretty printing for `f16` and `f128` consistent)
 - rust-lang#126656 (rustc_type_ir: Omit some struct fields from Debug output)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit f03bd96 into rust-lang:master Jun 19, 2024
6 checks passed
@rustbot rustbot added this to the 1.81.0 milestone Jun 19, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Jun 19, 2024
Rollup merge of rust-lang#123782 - oli-obk:equal_tait_args, r=compiler-errors

Test that opaque types can't have themselves as a hidden type with incompatible lifetimes

fixes rust-lang#122876

This PR used to add extra logic to prevent those cases, but after rust-lang#113169 this is implicitly rejected, because such usages are not defining.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-types Relevant to the types team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TAITs with different args incorrectly assumed to be equal
6 participants